package com.example.friend.entity.DO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.core.entity.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

@Data
@TableName("tb_user_exam")
public class UserExamDO extends BaseEntity {

    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "user_exam_id", type = IdType.ASSIGN_ID)
    private Long userExamId;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("exam_id")
    private Long examId;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("user_id")
    private Long userId;

    @TableField("score")
    private Integer score;

    @TableField("exam_rank")
    private Integer examRank;
}